package com.zhuss.controller.team;

import com.zhuss.bean.bo.team.information.DetailInfoBo;
import com.zhuss.bean.bo.team.information.SearchInfoBo;
import com.zhuss.common.BaseController;
import com.zhuss.common.ReadService;
import com.zhuss.exception.WpsException;
import com.zhuss.team.information.InformationReadServiceExt;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: zhushanshuo
 * @Date: 2020/3/3 15:19
 */
@RestController
@RequestMapping("/information")
public class InformationReadController extends BaseController {

    @Autowired
    @Qualifier("informationReadService")
    private ReadService<Object, Object> informationReadService;

    @Autowired
    @Qualifier("informationReadServiceExt")
    private InformationReadServiceExt informationReadServiceExt;

    /**
     * 详情
     * @throws WpsException
     */
    @ResponseBody
    @RequestMapping("/detail")
    public Object detail(@RequestBody DetailInfoBo bo) throws WpsException {
        Object result = informationReadService.detail(bo);
        return result;
    }

    /**
     * 列表
     * @throws WpsException
     */
    @ResponseBody
    @RequestMapping("/list")
    public Object list(@RequestBody SearchInfoBo bo) throws WpsException {
        Object result = informationReadService.list(bo);
        return result;
    }
}
